package com.sfac.cqlg.dao;

import com.sfac.cqlg.entity.Covid19;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 */
@Repository
@Mapper
public interface Covid19Dao {

    @Select("select * from common_covid19 where " +
            "region is null order by diagnosis desc")
    List<Covid19> getCovid19sForProvince();

    @Select("select * from common_covid19 where " +
            "province =#{province} and region is null order by statistical_time desc limit 7")
    List<Covid19> getCovid19sByProvince(String province);
}
